<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>顶部导航设置</title>
    <style type="text/css">
        .topnav {
            background-color: #333;
            overflow: hidden;
            /* height: 25px; */
            /* padding: 14px 16px; */
        }
        .topnav a {
            float: left;
            display: block;
            color: #f2f2f2;
            text-align: center;
            padding: 14px 16px;
            text-decoration: none;
            font-size: 17px;
        }
        .topnav a:hover {
            background-color: #ddd;
            color: black;
        }
        .topnav a.active {
            background-color: #4caf50;
            color: white;
        }
    </style>
</head>

<body>
<div class="topnav">
    <a class="active" href="#home">主页</a>
    <a href="#news">新闻</a>
    <a href="#contact">联系方式</a>
    <a href="#about">关于我们</a>
</div>

<div style="padding-left:16px">
    <h2>顶部导航实例</h2>
    <p>信息内容..</p>
</div>
</body>
</html>
